

$(function () {
    let $welcome = $("#welcome")
    let hour = (new Date()).getHours()
    console.log(hour)
    if (hour > 6 && hour < 12) {
        $welcome.text("早上好")
    } else if (hour >= 12 && hour < 14) {
        $welcome.text("中午好")
    } else if (hour >= 14 && hour < 20) {
        $welcome.text("下午好")
    } else {
        $welcome.text("晚上好")
    }
})

